package cn.chinaunicom.mini.program.dingtalk.events;

import lombok.Getter;

/**
 * @ProjectName: dingtalk-property
 * @Package: cn.chinaunicom.property.events
 * @ClassName: EvenType
 * @Description: 钉钉事件订阅的事件类型
 * @Author: wangjc
 * @CreateDate: 2024/6/6
 * @UpdateUser: wangjc
 * @UpdateDate: 2024/6/6
 * @UpdateRemark: 更新内容
 * @Version: 1.0
 */
@Getter
public enum DingTalkEvenType {

    // 钉钉内部应用：角色相关的事件类型
    LABEL_USER_CHANGE("label_user_change", "员工角色信息发生变更"),
    LABEL_CONF_ADD("label_conf_add", "添加角色或者角色组"),
    LABEL_CONF_MODIFY("label_conf_modify", "修改角色或者角色组"),
    LABEL_CONF_DEL("label_conf_del", "删除角色或者角色组"),
    // 钉钉第三方应用
    ORG_MICRO_APP_RESTORE("org_micro_app_restore", "应用恢复"),
    ORG_MICRO_APP_STOP("org_micro_app_stop", "应用停用"),
    ORG_MICRO_APP_REMOVE("org_micro_app_remove", "应用删除"),
    ORG_MICRO_APP_SCOPE_UPDATE("org_micro_app_scope_update", "应用可见范围更新"),
    GOODS_TRYOUT("goods_tryout", "应用试用"),
    ORG_SUITE_AUTH("org_suite_auth", "套件授权"),
    ORG_SUITE_RELIEVE("org_suite_relieve", "套件解除授权"),
    ORG_SUITE_CHANGE("org_suite_change", "套件变更"),
    ORG_UPDATE("org_update", "企业变更"),
    ORG_REMOVE("org_remove", "企业删除"),
    SERVICEGROUP_TICKET_CREATE("servicegroup_ticket_create", "服务群ticket创建"),
    SUITE_TICKET("suite_ticket", "套件ticket"),
    APP_MAKET_ORDER("market_order", "应用订购"),
    APP_MAKET_ORDER_CANCEL("market_order_refund_event", "应用订单退款"),
    INTEGRATION_APP_INSTALL("integration_app_install_event", "一体化应用安装事件"),
    LIGHT_OPPORTUNITY_NOTICE("light_opportunity_notice", "轻应用商机通知"),
    MARKET_SERVICE_OPEN("market_service_open", "轻应用服务开通"),
    MARKET_SERVICE_CLOSE("market_service_close", "轻应用服务关闭"),

    ORG_ROLE_ADD("org_role_add", "角色添加"),
    ORG_ROLE_UPDATE("org_role_modify", "角色更新"),
    ORG_ROLE_DELETE("org_role_remove", "角色删除"),
    DEPT_ADD("org_dept_create", "部门添加"),
    DEPT_UPDATE("org_dept_modify", "部门更新"),
    DEPT_DELETE("org_dept_remove", "部门删除"),
    USER_ADD("user_add_org", "用户添加"),
    USER_UPDATE("user_modify_org", "用户更新"),
    USER_DELETE("user_leave_org", "用户删除"),
    USER_ACTIVE("user_active_org", "用户激活"),
    USER_DEPT_CHANGE("user_dept_change", "用户部门变更"),
    USER_ROLE_CHANGE("user_role_change", "用户角色变更");

    DingTalkEvenType(String eventType, String eventName){
        this.type = eventType;
        this.name = eventName;
    }

    /**
     * 事件类型
     */
    private String type;
    /**
     * 事件名称
     */
    private String name;
}
